﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using S.PurchaseAndSales.Domain.Model;
using S.PurchaseAndSales.Domain.SqlServer;
using S.PurchaseAndSales.Infrastructure.Interface.SalesForm;

namespace S.PurchaseAndSales.Infrastructure.Impl.SalesForm
{
    public class CustomerRepository : BaseRepository<CustomerInformationModel>, ICustomerRepository
    {
        public CustomerRepository(SqlDbContext db) : base(db)
        {
        }
        /// <summary>
        /// 批量添加客户
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public async Task<bool> BAddCustom(List<CustomerInformationModel> list)
        {
            await db.CustomerInformationModels.AddRangeAsync(list);
            return await db.SaveChangesAsync()>0;
        }
    }
}
